#include <iostream>
using namespace std;

long factorial(long number) {
    if (1 >= number) {
        return 1;
    }
    else {
        return number * factorial(number - 1);
    }

}

long factorialCycle(long number) {
    long result{ 1 };
    for (long i(number);i >= 1;--i) {
        result *= i;
    }
    return result;
}

int main() {

    for (int i = 0; i < 10;++i) {
        cout << "factorial(" << i << ") = " << factorialCycle(i) << "\n";
    }

    return 0;
}